Artifical Intelligence

As you probably know, a computer doesn't have a brain. The closest thing it has is the processor, and that's about as capable of making intelligent decisions as a giraffe is at walking on it's back legs only.


So, when it comes to giving the computer intelligence, the best you are going to get is getting it to make an informed decision. And how exactly would you go about this?

Well, it's pretty easy really. There are books all over the place on this subject which claim that Artificial intelligence is hard to implement. It isn't. It's very easy. All you need to remember is that the computer cannot think for itself and you're half way there.

However, while remembering a simple fact about the computer may seem easy, that's not all there is to it. You then have to get your computer to make an informed decision. And how do you get anything to make an informed decision? Give it information to base its decision on.

This applies to any form of AI which you intend to program. Be it a program to calculate the multiplication of two numbers, or a game routine deciding where a little person will go next depending on where it's just been, and in accordance with its surroundings.

Now those are two very different types of program, but amazingly, the same principle applies to both. You have to give the computer information before it can make any decisions for you.

The information is very different of course. With the first example, you give the computer 2 numbers and it will work them out, with the second you actually don't give it any information at the time the calculation is carried out.

If you were programming something like Theme Park, which admittedly is something much too complex to put in a magazine which is supposed to cater for both experts and beginners like this one.

Say you were trying to get one little person in the Theme park to decide where to go from its current position. Using artificial intelligence would have got himm there in the first place, so you have to carry on the AI from the that point.

Ok, the person enters the park. What does he do? Walk down the path as far as possible until he gets to a junction. When what does he do? Ok, at this point you would get the computer to choose from a pre prepared list of rides which were available in the park for people to go on.

But then what? Well, you would get this little person to head towards that ride. But of course, the path might not go straight there, so the person would need to take an appropriate turn at any junctions he came to and head in the general direction of the ride he wanted to get to and eventually, he would end up there.

But on the way, there would be many more things to take into account such as whether the person was getting bored, which would probably be some form of equation based on how long the person had been in the park and how many enjoyable rides the person had been on since he'd been there.

Now, that's just one example of how artificial intelligence could be used in a game. But artificial intelligence is not always things like that. It can be as simple as detecting whether the a string has any characters in it or not.

Originally, I was going to make this some form of programming lesson, but upon figuring that not everyone has a copy of Blitz Basic 2.1, I decided to make it theory only, which makes it significantly easier to explain.

All in all, AI is very easy to accomplish, and now we've explained the basics, I expect some good games coming our way in our wonderful competition for the Amiga's birthday.

NEIL BULLOCK